import http from "@/utils/http";

export function selectBlogsList(data) {
  return http.get({ desc: "查询文章列表", url: "/blog", data });
}

export function updateBlog(data) {
  return http.post({ desc: "更新文章", url: `/blog/${data.id}`, data });
}

export function toggleStatus(data) {
  return http.post({ desc: "切换文章状态", url: `/blog/toggleStatus`, data });
}

export function dropBlog(data) {
  return http.delete({ desc: "删除文章", url: `/blog/${data.id}` });
}
